feat: blur, transparency, focus mode & performance optimizations#66
feat: blur, transparency, focus mode & performance optimizations#66postadelmaga wants to merge 4 commits intoDenysMb:mainfrom
Conversation
Features: - Browser spoofing (Chrome 130 UA) for auth compatibility - CSS transparency/blur injection with backdrop-filter - Focus mode: hide sidebars and non-essential UI per service - Accent glow border, header gradient, animation controls - Keep WebEngine alive option for instant reopen - Enter-to-send keyboard shortcuts for compatible chat services - Last visited URL persistence across WebView unload/reload Performance: - Pre-built JS injection strings as readonly properties (zero rebuild per page load) - Batch DOM reads before writes in transparency injection (no layout thrashing) - MutationObserver replaces setInterval polling for textarea focus - Narrow focus mode heuristic selectors (body > div instead of all divs) - Debounced renderChatModel with single-pass customSites parsing - Accent glow wrapped in Loader (zero objects when disabled) - Header animations gated on enableAnimations + autoHideHeader - Download signal connections cleanup on Component destruction Co-Authored-By: Claude <claude@anthropic.com>
ContextMenu.qml uses PlasmaExtras.Menu/MenuItem which do not exist in Plasma 6. Additionally, PlasmaComponents3.Menu cannot be used as a root type in a separate QML file (causes "Type cannot be created in QML" at runtime). The context menu is already implemented inline in WebView.qml using PlasmaComponents3.Menu, which is the only working approach on Plasma 6. Co-Authored-By: Claude <claude@anthropic.com>
The previous commit was missing the performance fixes due to a stash conflict. This adds all optimizations: - Pre-built JS strings for blur/keyboard injection - Batch DOM reads before writes (no layout thrashing) - MutationObserver replaces setInterval for textarea focus - Narrowed focus mode selectors - Debounced renderChatModel with single-pass customSites parsing - Header animations gated on enableAnimations + autoHideHeader - Download signal cleanup on Component.onDestruction Co-Authored-By: Claude <claude@anthropic.com>
Performance: - Pre-built JS injection strings as readonly properties - Batch DOM reads before writes in transparency (no layout thrashing) - MutationObserver replaces setInterval for textarea focus - Narrowed focus mode selectors (body > div vs all divs) - Debounced renderChatModel with single-pass customSites parsing - Accent glow wrapped in Loader (zero objects when disabled) - Header animations gated on enableAnimations + autoHideHeader - interactionTimer interval 500ms -> 1000ms - Download signal cleanup on Component.onDestruction Feature: - Configurable new chat shortcut (default Ctrl+Shift+O) - If customized, intercepts the custom combo and dispatches the default Ctrl+Shift+O to the page - Setting in General config with Reset button Co-Authored-By: Claude <claude@anthropic.com>
|
Hey! Thank you for the contribution. I didn't like the idea of this blur feature making changes in the DOM, it can significantly affect the issue of accessibility. Furthermore, the changes to browser spoofing not only failed to resolve the authentication problem with Claude, but also caused several other services to stop working, making it no longer possible to authenticate with Google. I like the idea of making changes to improve performance and address minor issues we might have, but I didn't like the two I mentioned above. If you still decide to contribute, I recommend a PR focused solely on performance issues. |
Summary
rgba+backdrop-filterto background elementsPlasmaExtras.Menu/MenuItemwhich don't exist in Plasma 6;PlasmaComponents3.Menucan't be a root type in a separate file. Context menu is now inline in WebView.qml.Performance optimizations
readonly property)MutationObserverreplacessetInterval(100ms)for textarea focusbody > divvsdiv, section)renderChatModel+ single-passcustomSitesparsingLoaderenableAnimations && autoHideHeaderComponent.onDestructionTest plan